package program.TokenAndParser;

/**
 * A class representing a Token.
 * @author Jef Keijers/Bachelor of Science: Informatics
 * @version 1.0
 */
public class Token {
	
	/**
	 * This constructor instanstiate a new token with a new string representing the token.
	 * @param 	charlist
	 * @param 	from
	 * @param 	to
	 */
	public Token(char [] charlist,int from, int to) {
		while (from <= to) {
			token.append(charlist[from]);
			from++;
		}
	}
	
	/**
	 * This method returns the string representation of the token.
	 * @return
	 */
	public String getToken() {
		return token.toString();
	}	
	
	/**
	 * Instance variable representing the token as a Stringbuilder object.
	 */
	private StringBuilder token=new StringBuilder();
	
}
